package com.lagou.no4

import akka.actor.{ActorRef, ActorSystem, Props}
object ActorGame {
  def main(args: Array[String]): Unit = {
    //启动通信
    val actorfactor = ActorSystem("actorfactor")
    val bActorRef: ActorRef = actorfactor.actorOf(Props[ActorB],"ActorB")
    val aActorRef: ActorRef = actorfactor.actorOf(Props(new ActorA(bActorRef)), "ActorA")
    aActorRef ! "start"
  }
}


